package cn.edu.sdjzu.xg23.kcsj01_backend.mapper;


import cn.edu.sdjzu.xg23.kcsj01_backend.entity.Subject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SubjectMapper {

    @Select("SELECT * FROM subject WHERE id = #{id}")
    Subject getSubjectById(Long id);

    @Select("SELECT * FROM subject")
    List<Subject> getAllSubjects();
}
